﻿from unicurses import *
import random
import math
import re

#*******************************************************************************
#
#	DEFINE
#
#*******************************************************************************

MAP_W = 80
MAP_H = 20

HUD_W = 20
HUD_H = 5

ROOM_MIN_SIZE = 4
ROOM_MAX_SIZE = 8
MAX_ROOMS = 18
FOV = 4 #exploration
FOW = 8 #fog of war

ROOM_MAX_MONSTERS = 2
ROOM_MAX_ITEMS = 3

#*********
#actions
#*********
QUIT = 0
NONE = 1
TURN_TAKEN = 2

#*********
#player dead or alive
#*********
DEAD = 0
ALIVE = 1

#*********
#tile type
#*********
VOID = 0
V_WALL = 1 #vertical wall
H_WALL = 2 #horizontal wall
X_WALL = 3 #corner
FLOOR = 4
CORRIDOR = 5
WATER = 6
LAVA = 7
O_DOOR = 8 #opened door
U_DOOR = 9 #unlocked door
L_DOOR = 10 #locked door
U_STAIR = 11 #up staircase
D_STAIR = 12 #down staircase

#*********
#stats
#*********
STR = 0
DEX = 1
CON = 2
INT = 3
WIS = 4
CHA = 5

MAX_CH_LVL = 20

#*********
#alignment
#*********
EVIL = 0
NEUTRAL = 1
GOOD = 2

ALIGNMENT = ["Evil","Neutral","Good"]

#*********
#hunger lvl
#*********
FULL = 0
SATIATED = 1
NOT_HUNGRY = 2
HUNGRY = 3
STARVING = 4
STARVED_TO_DEATH = 5

HUNGER_LVL=["Full            ","Satiated        ","Not Hungry      ","Hungry          ","Starving        ","Starved to death "]

#*********
#m_weapons
#*********
#name;slot;d1;d2;d3;weight;cost
#slot: 
#1 one handed 
#2 two handed
#3 one or two handed, if two handed +1 damage bonus
M_WEAPONS=[
'Battle axe;3;1;8;0;15;5',
'Hand axe;1;1;6;0;5;1',
'Club;1;1;4;10;0;'
'Dagger;1;1;4;0;2;2',
'Two handed Flail;2;1;8;10;8;',
'War hammer;1;1;4;1;10;1',
'Lance;1;2;4;1;15;6',
'Heavy mace;1;1;6;0;10;10',
'Two handed polearm;2;1;8;1;15;10',
'Spear;3;1;6;0;10;1',
'Two handed staff;2;1;6;0;10;0',
'Bastard sword;3;1;8;0;10;20',
'Long sword;1;1;8;0;10;15',
'Short sword;1;1;6;0;5;8',
'Two handed sword;1;1;10;0;15;30'
]
#*********
#r_weapons
#*********

#*********
#ammo
#*********

#*********
#armors
#*********
#name;ac;weight;cost
ARMORS=[
'Cloth armor;1;5;5',
'Leather armor;2;25;10',
'Chainmail armor;3;50;75',
'Plate armor;5;70;100',
'Mithril armor;7;20;500',
'Dragonscale armor;9;15;1000'
]

#*********
#shields
#*********
#name;ac;weight;cost
SHIELDS=[
'Wooden shield;1;10;15'
]
#*********
#artifacts
#*********

#*********
#effects
#*********

#*********
#sprite list
#*********

SPRITE_LIST=[' ','.','#','-','|','+','~']

#*********
#monster list
#*********
#name;hit_dice;armor_class;attacks(name + damage);saving_throw;specials;alignment;challenge_level;xp;items;gold;sprite;color;bold
MONSTERS=[
'Gobelin;1;6;0;12;Weapon;1;6;0;18;;Chaos;B;10;g;COLOR_GREEN;False'
]

	
#*******************************************************************************
#
#	OLD
#
#*******************************************************************************

DAGGER=0
SWORD=1
MACE=2
AXE=3
STAFF=4
POLEARM=5

WA_QUALITY=["Wooden","Iron","Steel","Titanium","Iridium","Adamentium"]
M_WEAPON_TYPE=["Dagger","Sword","Mace","Axe","Staff","Polearm"]
MW_TYPE_HIT=[0, 0, 0, 0, 1, 1]
MW_TYPE_DMG=[4, 6, 6, 8, 3, 8]
MW_TYPE_WEIGHT=[1.0, 2.0, 2.0, 2.5, 1.0, 2.5] #kilo grams
MW_TYPE_PRICE=[10, 25, 25, 50, 10, 50] #gold pieces

MW_QUALITY_HIT=[0, 0, 1, 2, 4, 6]
MW_QUALITY_DMG=[0, 1, 2, 3, 4, 8]
MW_QUALITY_ROLL=[1, 1, 1, 2, 3, 5]
MW_QUALITY_WEIGHT=[0.75, 1.5, 2.0, 2.5, 5.0, 1.0]
MW_QUALITY_PRICE=[1, 2, 5, 10, 50, 500]

#*********
#classes
#*********
ASSASSIN = 0
BARD = 1
DRUID = 2
MERCHANT = 3
MONK = 4
NECROMANCER = 5
PALADIN = 6
HEALER = 7
RANGER = 8
ROGUE = 9
WARRIOR = 10
WIZARD = 11

CLASSES=["Assassin","Bard","Druid","Merchant","Monk","Necromancer","Paladin","Healer","Ranger","Rogue","Warrior","Wizard"]

#*********
#races
#*********
CATFOLK = 0
DWARF = 1
ELF = 2
GNOME = 3
GOBELIN = 4
HOBBIT = 5
HUMAN = 6
ORC = 7
PANDA = 8
UNDEAD = 9
VAMPIRE = 10
WEREWOLF = 11

RACES=["Catfolk","Dwarf","Elf","Gnome","Gobelin","Hobbit","Human","Orc","Panda","Undead","Vampire","Werewolf"]

#*********
#sizes
#*********
DIMINUTIVE = 0
TINY = 1
SMALL = 2
MEDIUM = 3
LARGE = 4
HUGE = 5
COLOSSAL = 6

SIZES=["Diminutive","Tiny","Small","Medium","Large","Huge","Colossal"]